Skip to content

Add deterministic pane-targeted agent actions - #607

Open
Kai Tao (vanzue) wants to merge 1 commit into
mainfrom
dev/vanzue/deterministic-pane-slash-commands
Open

Add deterministic pane-targeted agent actions#607
Kai Tao (vanzue) wants to merge 1 commit into
mainfrom
dev/vanzue/deterministic-pane-slash-commands

Conversation

@vanzue

Copy link
Copy Markdown
Contributor

Summary

  • add a cached per-tab pane catalog and persistent @ target selection reflected by the Agent chip
  • keep plain prompts on the normal Copilot path while supplying the selected pane as preferred context
  • add deterministic /command (/cmd) command cards, $ direct execution, and /delegate destination creation
  • bind host execution to trusted pane GUIDs and validate model-prepared proposals before showing Run/Insert actions
  • document the workflow and add localized UI strings and focused coverage

Validation

  • cargo test --manifest-path tools/wta/Cargo.toml --quiet (1463 passed)
  • cargo build --target x86_64-pc-windows-msvc --manifest-path tools/wta/Cargo.toml --quiet
  • live Debug package verification of pane selection, Agent chip targeting, command cards, and direct execution

Add persistent pane targeting, deterministic command and delegate workflows, direct terminal execution, and Agent chip feedback.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9f85754b-11fa-4f92-abb0-c7a24d695491
Copilot AI lite review requested due to automatic review settings August 12, 2026 10:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds deterministic, pane-targeted agent workflows to the Intelligent Terminal stack by publishing a per-tab pane catalog (with stable pane/session identifiers) and wiring new “pane mention” + delegate UX through WTA’s TUI and localization.

Changes:

  • Adds new WTA TUI popups for pane targeting (@) and delegate destination selection, and wires them into the main layout.
  • Extends pane context metadata (cached pane details) and command parsing to support /command (/cmd) and /delegate, including a narrow @-picker trigger.
  • Publishes pane catalog updates from TerminalApp (pane catalog event + generation tracking) and updates pane SessionId extraction to support cataloging.

Reviewed changes

Copilot reviewed 117 out of 117 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tools/wta/src/ui/pane_popup.rs New pane-target picker popup UI rendering.
tools/wta/src/ui/delegate_popup.rs New delegate destination picker popup UI rendering.
tools/wta/src/ui/mod.rs Registers/exports new popup modules and state types.
tools/wta/src/ui/layout.rs Renders the new pane/delegate popups when active.
tools/wta/src/protocol/acp/prompt_builder.rs Updates tests for added PaneContext.cached_source field.
tools/wta/src/pane_context.rs Adds cached pane metadata and stores it in PaneContext.
tools/wta/src/coordinator.rs Makes OpenTarget copyable and refactors validation match formatting.
tools/wta/src/commands.rs Adds /command + /delegate, /cmd alias handling, and pane-picker prefix detection.
tools/wta/src/app/input_edit.rs Opens/closes pane picker based on the new prefix detection during input refresh.
tools/wta/src/app/autofix.rs Populates PaneContext.cached_source (None) and refactors formatting.
tools/wta/src/app_contracts/event.rs Adds DelegateDestinationReady event to app contract.
tools/wta/prompts/prepare-pane-input.md New prompt template for deterministic command-card preparation.
tools/wta/prompts/prepare-delegate-prompt.md New prompt template for delegate prompt preparation.
tools/wta/locales/en-US.yml Adds localized strings for pane picker, delegate picker, and delegate button.
tools/wta/locales/en-GB.yml Adds localized strings for pane picker, delegate picker, and delegate button.
tools/wta/locales/zh-TW.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/zh-CN.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/vi-VN.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/uz-Latn-UZ.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/ur-PK.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/uk-UA.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/tt-RU.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/tr-TR.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/th-TH.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/sv-SE.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/sr-Latn-RS.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/sq-AL.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/sl-SI.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/sk-SK.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/ru-RU.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/ro-RO.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/quz-PE.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/pt-PT.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/pt-BR.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/pl-PL.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/nn-NO.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/nb-NO.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/nl-NL.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/ne-NP.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/mt-MT.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/ms-MY.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/mr-IN.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/mk-MK.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/mi-NZ.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/lv-LV.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/lt-LT.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/lb-LU.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/ko-KR.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/kk-KZ.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/ka-GE.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/ja-JP.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/it-IT.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/is-IS.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/id-ID.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/hy-AM.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/hu-HU.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/hr-HR.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/hi-IN.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/he-IL.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/gu-IN.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/gl-ES.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/ga-IE.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/fr-FR.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/fr-CA.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/fi-FI.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/fa-IR.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/eu-ES.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/et-EE.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/es-MX.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/es-ES.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/el-GR.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/de-DE.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/da-DK.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/cy-GB.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/cs-CZ.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/ca-ES.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/ca-Es-VALENCIA.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/bs-Latn-BA.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/bn-IN.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/bg-BG.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/az-Latn-AZ.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/as-IN.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/ar-SA.yml Adds localized strings for pane/delegate picker flows and buttons.
tools/wta/locales/af-ZA.yml Adds localized strings for pane/delegate picker flows and buttons.
src/cascadia/TerminalApp/TerminalPage.h Tracks per-tab pane-catalog generations and adds catalog publishing helper.
src/cascadia/TerminalApp/Tab.h Adds pane-catalog change event to notify listeners.
src/cascadia/TerminalApp/Pane.cpp Updates pane SessionId retrieval to follow the terminal control/connection path.
Suppressed comments (1)

tools/wta/locales/sr-Latn-RS.yml:86

  • This command summary still contains placeholder markers (__PH0__ __PH1__) instead of the intended locked tokens (/delegate <intent>).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +64 to +70
delegate_picker.title: " ۋەكىللەر مەنزىلى "
delegate_picker.tab: " يېڭى بەتكۈچ"
delegate_picker.panel: " يېڭى گۇرۇپپا"
delegate_picker.intent_required: " ۋەكىللىك قىلىدىغان ئەسەرنى تەسۋىرلەڭ."
delegate_picker.pane_not_allowed: " __ PH0__ ھەمىشە يېڭى مەنزىل ھاسىل قىلىدۇ ۋە @pane نى قوبۇل قىلمايدۇ."
delegate_picker.not_configured: " ھېچقانداق ۋەكىل ۋاكالەتچىسى سەپلەنمىدى."
delegate_picker.no_parent_pane: " بۆلۈنۈشكە ھېچقانداق خىزمەت تاختىسى يوق."
Comment on lines +62 to +66
delegate_picker.title: " ପ୍ରତିନିଧୀ ଗନ୍ତବ୍ୟସ୍ଥଳ | "
delegate_picker.tab: " ନୂତନ ଟ୍ୟାବ୍ |"
delegate_picker.panel: " ନୂତନ ପ୍ୟାନେଲ୍ |"
delegate_picker.intent_required: " ପ୍ରତିନିଧିତ୍ୱ କରିବାକୁ କାର୍ଯ୍ୟ ବର୍ଣ୍ଣନା କର |"
delegate_picker.pane_not_allowed: " __ PH0__ ସର୍ବଦା ଏକ ନୂତନ ଗନ୍ତବ୍ୟସ୍ଥଳ ସୃଷ୍ଟି କରେ ଏବଂ @pane ଗ୍ରହଣ କରେ ନାହିଁ |"
Comment on lines +62 to +66
delegate_picker.title: " Делегат "
delegate_picker.tab: " Яңа кыстыргыч"
delegate_picker.panel: " Яңа панель"
delegate_picker.intent_required: " Тапшыру өчен эшне сурәтләгез."
delegate_picker.pane_not_allowed: " __ PH0__ һәрвакыт яңа юнәлеш тудыра һәм @pane кабул итми."
Comment on lines +66 to +69
delegate_picker.pane_not_allowed: "__PH0__ uvek kreira novo odredište i ne prihvata __PH3__."
delegate_picker.not_configured: "Nijedan delegatski agent nije konfigurisan."
delegate_picker.no_parent_pane: "Nijedan radni okno nije dostupan za razdvajanje."
delegate_picker.launch_failed: "Nije moguće pokrenuti delegata: __PH2__"

# ── Agent picker (src/ui/agent_popup.rs) ────────────────────────────────────
# {Locked="↑","↓","Enter","Esc"} - key names, do not translate
pane_picker.title: "Izaberite okno terminala (__PH9__ __PH10__ • __PH4__ • __PH6__)"
@github-actions

Copy link
Copy Markdown

check-spelling-bot Report

⚠️ Dictionary not found

Problems were encountered retrieving check dictionaries (cspell:cpp/src/compiler-msvc.txt cspell:public-licenses/src/additional-licenses.txt cspell:rust/dict/rust.txt cspell:latex/dict/latex.txt cspell:k8s/dict/k8s.txt cspell:ruby/dict/ruby.txt cspell:scala/dict/scala.txt cspell:public-licenses/src/generated/public-licenses.txt cspell:cpp/src/lang-jargon.txt cspell:html/dict/html.txt cspell:node/dict/node.txt cspell:dotnet/dict/dotnet.txt cspell:elixir/dict/elixir.txt cspell:clojure/src/clojure.txt cspell:cpp/src/compiler-clang-attributes.txt cspell:django/dict/django.txt cspell:monkeyc/src/monkeyc_keywords.txt cspell:software-terms/dict/webServices.txt cspell:php/dict/php.txt cspell:dart/src/dart.txt cspell:python/src/python/python.txt cspell:cpp/src/ecosystem.txt cspell:cpp/src/stdlib-cpp.txt cspell:cpp/src/stdlib-cmath.txt cspell:ada/dict/ada.txt cspell:cpp/src/people.txt cspell:golang/dict/go.txt cspell:java/src/java-terms.txt cspell:css/dict/css.txt cspell:cpp/src/lang-keywords.txt cspell:docker/src/docker-words.txt cspell:shell/dict/shell-all-words.txt cspell:software-terms/dict/softwareTerms.txt cspell:cpp/src/stdlib-cerrno.txt cspell:powershell/dict/powershell.txt cspell:sql/src/tsql.txt cspell:svelte/dict/svelte.txt cspell:cpp/src/compiler-gcc.txt cspell:sql/src/sql.txt cspell:java/src/java.txt cspell:python/src/additional_words.txt cspell:typescript/dict/typescript.txt cspell:npm/dict/npm.txt cspell:r/src/r.txt cspell:fullstack/dict/fullstack.txt cspell:swift/src/swift.txt cspell:redis/dict/redis.txt cspell:haskell/dict/haskell.txt cspell:python/src/python/python-lib.txt cspell:cpp/src/stdlib-c.txt cspell:gaming-terms/dict/gaming-terms.txt cspell:python/src/common/extra.txt cspell:lua/dict/lua.txt cspell:cpp/src/template-strings.txt).

⚠️ For more information, see check-dictionary-not-found.

🔴 Please review

See the 📂 files view, the 📜action log, 👼 SARIF report, or 📝 job summary for details.

Unrecognized words (1)

retargeting

These words are not needed and should be removed AHP aiu Backgrounder CANTCALLOUT Ccc cplusplus ctl Debian depl dotnet drv endptr EOFs evt frob frobnicate Fullwidth gitlab hdr idl IME inbox ININPUTSYNCCALL INJ intelligentterminal Ioctl KVM lbl lld lsb NODEFAULT NONINFRINGEMENT notif oss outdir Podcast pri prioritization rcv segfault SND sourced SWP Tbl testname transitioning unk unparseable unregisters Virt VMs webpage websites WINVER WSLENV xsi

To accept these unrecognized words as correct and remove the previously acknowledged and now absent words, you could run the following commands

... in a clone of the git@github.com:microsoft/intelligent-terminal.git repository
on the dev/vanzue/deterministic-pane-slash-commands branch (ℹ️ how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/cfb6f7e75bbfc89c71eaa30366d0c166f1bd9c8c/apply.pl' |
perl - 'https://github.com/microsoft/intelligent-terminal/actions/runs/31586751710/attempts/1' &&
git commit -m 'Update check-spelling metadata'
Available 📚 dictionaries could cover words (expected and unrecognized) not in the 📘 dictionary

This includes both expected items (2100) from .github/actions/spelling/expect/alphabet.txt .github/actions/spelling/expect/expect.txt .github/actions/spelling/expect/web.txt and unrecognized words (1)

Dictionary Entries Covers Uniquely
cspell:csharp/csharp.txt 32 2 2
cspell:aws/aws.txt 232 2 2
cspell:fonts/fonts.txt 536 1 1

Consider adding to the extra_dictionaries array (in the .github/actions/spelling/config.json file):

    "cspell:csharp/csharp.txt",
    "cspell:aws/aws.txt",
    "cspell:fonts/fonts.txt",

To stop checking additional dictionaries, put (in the .github/actions/spelling/config.json file):

"check_extra_dictionaries": []

Pattern suggestions ✂️ (1)

You could add these patterns to .github/actions/spelling/patterns/8539ac61a352f52fb7ea3dbb62ffc4f1aabf9497.txt:

# Automatically suggested patterns

# hit-count: 1 file-count: 1
# container images
image: [-\w./:@]+

Alternatively, if a pattern suggestion doesn't make sense for this project, add a # to the beginning of the line in the candidates file with the pattern to stop suggesting it.

Warnings and Notices ⚠️ (2)

See the 📂 files view, the 📜action log, 👼 SARIF report, or 📝 job summary for details.

⚠️ Warnings and Notices Count
ℹ️ candidate-pattern 1
⚠️ check-dictionary-not-found 54

See ⚠️ Event descriptions for more information.

✏️ Contributor please read this

By default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.

If the listed items are:

  • ... misspelled, then please correct them instead of using the command.
  • ... names, please add them to .github/actions/spelling/allow/names.txt.
  • ... APIs, you can add them to a file in .github/actions/spelling/allow/.
  • ... just things you're using, please add them to an appropriate file in .github/actions/spelling/expect/.
  • ... tokens you only need in one place and shouldn't generally be used, you can add an item in an appropriate file in .github/actions/spelling/patterns/.

See the README.md in each directory for more information.

🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉

If the flagged items are 🤯 false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants